import './App.css';
import React from 'react';
import NewsList from './pages/NewsList';
import NewsDetail from './pages/NewsDetail';
import {Route, Redirect, Switch} from 'react-router-dom';

export default class App extends React.Component{

  render(){
    return <div className="container">
      <Switch>
        <Route exact path="/news" component={NewsList} />
        <Route exact path="/news/:id" component={NewsDetail} />
        <Redirect to="/news" />
      </Switch>
    </div>
  }
} 
